package com.ciei.dpagm.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ciei.dpagm.common.service.BaseService;
import com.ciei.dpagm.entity.ChipInterface;
import com.ciei.dpagm.entity.ChipPin;
import com.ciei.dpagm.mapper.ChipPinMapper;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wangyan
 * @date 2023/05/09
 */
@Service
public class ChipPinService extends BaseService<ChipPinMapper, ChipPin> {

    /**
     * 获取列表
     * @param masterChipIdList
     * @return
     */
    public List<ChipPin> getList(List<Integer> masterChipIdList){
        if(masterChipIdList.isEmpty()){
            return new ArrayList<>();
        }
        LambdaQueryWrapper<ChipPin> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.in(ChipPin::getChipId,masterChipIdList);
        return list(lambdaQueryWrapper);
    }

}
